import React from 'react';
import {
  View,
  Text,
  TouchableOpacity,
  TouchableHighlight,
} from 'react-native';

import TImage from '../../components/TImage';
import SizeUtils from '../../common/SizeUtils';
import Constants from '../../common/Constants';
import Config from '../../config';
import CommonListPage from '../common/CommonListPage';
import QZ_ChatMemberItemView from './QZ_ChatMemberItemView';
import QZ_RequestQunMemberUncheckedListAction from '../../actions/quanzi/QZ_RequestQunMemberUncheckedListAction';

export default class QZ_QunMemberUncheckedListPage extends CommonListPage {
  constructor(props) {
    super(props);
     this._dataKey = "board_id";
     this._autoInitRequest = false;

     this.state.chatgroupData = {};
  }

  _dealAfterEnterAnimation() {
    if(this.state.chatgroupData != this.props.pageData.routeData){
      this.setState({
        chatgroupData:this.props.pageData.routeData,
      })
    }
    this._listView.doRefresh();
  }

  _dealEnterPage() {

  }

  _dealLeavePage() {
    super._dealLeavePage();

    this._listView.clear();
  }

  _onRenderItem(data, index) {
    return (<QZ_ChatMemberItemView data={data} groupData={this.state.chatgroupData} unchecked={true}/>);
  }

  _onPressItem(data) {

  }

  _requestData(page, listView) {
     new QZ_RequestQunMemberUncheckedListAction().call(listView, {page:page,
      board_id:this.props.pageData.routeData.board_id,
      chatgroup_id:this.props.pageData.routeData.chatgroup_id});
  }
}
